package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SBusinessItemUpdate extends Object implements IMessageBase
    {
        public var updateType:EUpdateType;
        public var index:int;
        public var coin:int;
        public var gold:int;
        public var playerItem:SPlayerItem;
        public const _type:int = 20300;
        public static var _regist:SBusinessItemUpdate = new SBusinessItemUpdate(true);

        public function SBusinessItemUpdate(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SBusinessItemUpdate();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.updateType.__write(param1);
            param1.writeInt(this.index);
            param1.writeInt(this.coin);
            param1.writeInt(this.gold);
            this.playerItem.__write(param1);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.updateType = EUpdateType.__read(param1);
            this.index = param1.readInt();
            this.coin = param1.readInt();
            this.gold = param1.readInt();
            this.playerItem = new SPlayerItem();
            this.playerItem.__read(param1);
            
        }

    }
}
